package ri.util;

public class ScoreUser implements Comparable<Object>{
	
	public Integer id;
	public Float score;
	
	public ScoreUser(Integer id, Float score) {
		this.id = id;
		this.score = score;
	}

	@Override
	public int compareTo(Object o) {
		if((o instanceof ScoreUser)){
			ScoreUser s = (ScoreUser) o;
			if(score < s.score){
				return 1;
			}
			if(score > s.score){
				return -1;
			}
			return 0;
		}
		throw new RuntimeException("Tipo diferente de ScoreUser");
	}

}
